Optimal. Leaf size=258 \[ \frac {8 a^3 (c-3 d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{15 d^2 f}-\frac {2 \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) \sqrt {c+d \sin (e+f x)}}{5 d f}+\frac {4 a^3 \left (4 c^2-15 c d+27 d^2\right ) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{15 d^3 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {4 a^3 (c-d) \left (4 c^2-11 c d+15 d^2\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{15 d^3 f \sqrt {c+d \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.31, antiderivative size = 258, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2842, 3047,
3102, 2831, 2742, 2740, 2734, 2732} \begin {gather*} -\frac {4 a^3 (c-d) \left (4 c^2-11 c d+15 d^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{15 d^3 f \sqrt {c+d \sin (e+f x)}}+\frac {4 a^3 \left (4 c^2-15 c d+27 d^2\right ) \sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{15 d^3 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {8 a^3 (c-3 d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{15 d^2 f}-\frac {2 \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right ) \sqrt {c+d \sin (e+f x)}}{5 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2842
Rule 3047
Rule 3102
Rubi steps
\begin {align*} \int \frac {(a+a \sin (e+f x))^3}{\sqrt {c+d \sin (e+f x)}} \, dx &=-\frac {2 \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) \sqrt {c+d \sin (e+f x)}}{5 d f}+\frac {2 \int \frac {(a+a \sin (e+f x)) \left (a^2 (c+3 d)-2 a^2 (c-3 d) \sin (e+f x)\right )}{\sqrt {c+d \sin (e+f x)}} \, dx}{5 d}\\ &=-\frac {2 \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) \sqrt {c+d \sin (e+f x)}}{5 d f}+\frac {2 \int \frac {a^3 (c+3 d)+\left (-2 a^3 (c-3 d)+a^3 (c+3 d)\right ) \sin (e+f x)-2 a^3 (c-3 d) \sin ^2(e+f x)}{\sqrt {c+d \sin (e+f x)}} \, dx}{5 d}\\ &=\frac {8 a^3 (c-3 d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{15 d^2 f}-\frac {2 \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) \sqrt {c+d \sin (e+f x)}}{5 d f}+\frac {4 \int \frac {\frac {1}{2} a^3 d (c+15 d)+\frac {1}{2} a^3 \left (4 c^2-15 c d+27 d^2\right ) \sin (e+f x)}{\sqrt {c+d \sin (e+f x)}} \, dx}{15 d^2}\\ &=\frac {8 a^3 (c-3 d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{15 d^2 f}-\frac {2 \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) \sqrt {c+d \sin (e+f x)}}{5 d f}-\frac {\left (2 a^3 (c-d) \left (4 c^2-11 c d+15 d^2\right )\right ) \int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{15 d^3}+\frac {\left (2 a^3 \left (4 c^2-15 c d+27 d^2\right )\right ) \int \sqrt {c+d \sin (e+f x)} \, dx}{15 d^3}\\ &=\frac {8 a^3 (c-3 d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{15 d^2 f}-\frac {2 \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) \sqrt {c+d \sin (e+f x)}}{5 d f}+\frac {\left (2 a^3 \left (4 c^2-15 c d+27 d^2\right ) \sqrt {c+d \sin (e+f x)}\right ) \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{15 d^3 \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {\left (2 a^3 (c-d) \left (4 c^2-11 c d+15 d^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{15 d^3 \sqrt {c+d \sin (e+f x)}}\\ &=\frac {8 a^3 (c-3 d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{15 d^2 f}-\frac {2 \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right ) \sqrt {c+d \sin (e+f x)}}{5 d f}+\frac {4 a^3 \left (4 c^2-15 c d+27 d^2\right ) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{15 d^3 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {4 a^3 (c-d) \left (4 c^2-11 c d+15 d^2\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{15 d^3 f \sqrt {c+d \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.10, size = 246, normalized size = 0.95 \begin {gather*} -\frac {a^3 (1+\sin (e+f x))^3 \left (4 \left (4 c^3-11 c^2 d+12 c d^2+27 d^3\right ) E\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}-4 \left (4 c^3-15 c^2 d+26 c d^2-15 d^3\right ) F\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}-d \cos (e+f x) \left (8 c^2-30 c d-3 d^2+3 d^2 \cos (2 (e+f x))+2 (c-15 d) d \sin (e+f x)\right )\right )}{15 d^3 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^6 \sqrt {c+d \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1034\) vs.
\(2(304)=608\).
time = 5.10, size = 1035, normalized size = 4.01
method | result | size |
default | \(\frac {2 a^{3} \left (8 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c^{3} d -36 c^{2} \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d^{2}+112 c \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d^{3}-84 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d^{4}-8 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c^{4}+30 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c^{3} d -46 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c^{2} d^{2}-30 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c \,d^{3}+54 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d^{4}+3 d^{4} \left (\sin ^{4}\left (f x +e \right )\right )-c \,d^{3} \left (\sin ^{3}\left (f x +e \right )\right )+15 d^{4} \left (\sin ^{3}\left (f x +e \right )\right )-4 c^{2} d^{2} \left (\sin ^{2}\left (f x +e \right )\right )+15 c \,d^{3} \left (\sin ^{2}\left (f x +e \right )\right )-3 d^{4} \left (\sin ^{2}\left (f x +e \right )\right )+c \,d^{3} \sin \left (f x +e \right )-15 d^{4} \sin \left (f x +e \right )+4 c^{2} d^{2}-15 d^{3} c \right )}{15 d^{4} \cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}\) | \(1035\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.20, size = 556, normalized size = 2.16 \begin {gather*} -\frac {2 \, {\left (\sqrt {2} {\left (8 \, a^{3} c^{3} - 30 \, a^{3} c^{2} d + 51 \, a^{3} c d^{2} - 45 \, a^{3} d^{3}\right )} \sqrt {i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right ) + \sqrt {2} {\left (8 \, a^{3} c^{3} - 30 \, a^{3} c^{2} d + 51 \, a^{3} c d^{2} - 45 \, a^{3} d^{3}\right )} \sqrt {-i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right ) + 3 \, \sqrt {2} {\left (4 i \, a^{3} c^{2} d - 15 i \, a^{3} c d^{2} + 27 i \, a^{3} d^{3}\right )} \sqrt {i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right )\right ) + 3 \, \sqrt {2} {\left (-4 i \, a^{3} c^{2} d + 15 i \, a^{3} c d^{2} - 27 i \, a^{3} d^{3}\right )} \sqrt {-i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right )\right ) + 3 \, {\left (3 \, a^{3} d^{3} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (4 \, a^{3} c d^{2} - 15 \, a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {d \sin \left (f x + e\right ) + c}\right )}}{45 \, d^{4} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{3} \left (\int \frac {3 \sin {\left (e + f x \right )}}{\sqrt {c + d \sin {\left (e + f x \right )}}}\, dx + \int \frac {3 \sin ^{2}{\left (e + f x \right )}}{\sqrt {c + d \sin {\left (e + f x \right )}}}\, dx + \int \frac {\sin ^{3}{\left (e + f x \right )}}{\sqrt {c + d \sin {\left (e + f x \right )}}}\, dx + \int \frac {1}{\sqrt {c + d \sin {\left (e + f x \right )}}}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+a\,\sin \left (e+f\,x\right )\right )}^3}{\sqrt {c+d\,\sin \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________